package com.chen;

import com.chen.websocket.WSClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.PostConstruct;

@SpringBootApplication
@Slf4j
@EnableScheduling
public class TrainingServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(TrainingServiceApplication.class, args);
    }


    @PostConstruct
    public void init() {
        log.info("初始化应用程序");
        // 初始化ws，链接服务端
        WSClient.startWS();
    }
}
